<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateConfigTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('config', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('key', 255)->comment('配置键');
            $table->string('value', 255)->comment('配置值');
            $table->string('desc', 255)->comment('简述');
            $table->tinyInteger('status')->default(0)->comment('1为停用');
            $table->tinyInteger('type')->default(1)->comment('1为分享活动配置');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('config');
    }
}
